<?php
/**
 * File:          KValidator_Parameter_Upload_Ext
 * Description:   -
 * Author:        Kovac "Kovacou'" Alexandre (www.kovacou.fr)
 * Last Update:   21/04/2011
 */

   class KValidator_Parameter_Upload_Ext implements KValidatorParameter {
      public  $ext;
      
      public function valid ($value, $config) {
         if (false === in_array (strtolower(substr(strrchr($value['name'], '.'), 1)), $this->ext))
            return "Ce type de fichier n'est pas autorisé.";
      }
   }
 
/**
 * End
 * Of
 * File
 */
?>